<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMaintainInfosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('maintain_infos', function (Blueprint $table) {
            $table->increments('id');
            $table->string('device_code')->nullable();
            $table->string('customer_name');
            $table->string('phone');
            $table->string('installation_address');
            $table->string('component')->nullable();
            $table->float('charge')->nullable();
            $table->string('operator')->nullable();
            $table->string('operator_phone')->nullable();
            $table->timestamp('maintain_at')->nullable();
            $table->timestamp('reserve_at');
            $table->boolean('status')->default(0);
            $table->text('remark')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('maintain_infos');
    }
}
